package com.geekjam.dingdongandroid;

import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;
import com.geekjam.dingdongandroid.api.DingDongMessageProxy;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: shou1dwe
 * Date: 10/3/13
 * Time: 10:32 AM
 * To change this template use File | Settings | File Templates.
 */
public class MyAlarmService extends Service {

    private MediaPlayer mPlayer;
    private String LOG_TAG = "DingDong - MyAlarmService";

    @Override
    public void onCreate() {

        Toast.makeText(this, "MyAlarmService.onCreate()", Toast.LENGTH_LONG).show();
    }
    private void stopPlaying() {
        mPlayer.release();
        mPlayer = null;
    }

    @Override
    public IBinder onBind(Intent intent) {
        Toast.makeText(this, "MyAlarmService.onBind()", Toast.LENGTH_LONG).show();
        return null;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Toast.makeText(this, "MyAlarmService.onDestroy()", Toast.LENGTH_LONG).show();
    }


    @Override
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startId);
        Toast.makeText(this, "MyAlarmService.onStart()", Toast.LENGTH_LONG).show();
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Toast.makeText(this, "MyAlarmService.onUnbind()", Toast.LENGTH_LONG).show();
        return super.onUnbind(intent);
    }
}
